<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>自定义事件</title>
    <script type="module">
        import Events from './64.js'
        Events.on('my-message', (data) => {
            console.log(data)
        })
        document.querySelector('#btn').onclick = () => {
            Events.emit('my-message', { a: 1})
        }
    </script>
</head>
<body>
    <div id="app">
        <button id="btn">传递</button>
    </div>
</body>
</html>